home *** CD-ROM | disk | FTP | other *** search
- PC BASICA to Atari ST GFA BASIC 3 translation utility
- by myeck waters
- text updated 94/08/24
-
- BASICA.GFA is a quick-and-dirty program to aid in converting programs
- written for the old BASICA used on IBM compatibles to GFA BASIC 3. Output
- is in the form of a text file that is loaded into GFA using the MERGE
- function.
-
- This will not produce a completed translation but will greatly shorten the
- time needed to do it.
-
- WHAT IT WILL DO:
-
- Remove unnecessary line numbers.
-
- Convert the remaining line numbers to the GFA format, e.g.:
- PROCEDURE 1000 (for lines referenced by a GOSUB)
- 1000: (for other lines)
-
- Convert the single-quote used in REMarks after commands to the
- exclamation point used by GFA.
-
- Break up multi-statement lines, including multiple statements
- following an "IF" statement, e.g.:
- 4340 IF SV.MIN=O THEN GOSUB 3800 ELSE 4360 'input data if missing
- becomes:
- IF SV.MIN=O
- GOSUB 3800
- ELSE
- GOTO 4360 !input data if missing
- ENDIF
- (GFA will handle the indentation automatically. If it doesn't indent
- properly, there is probably a problem with a PROCEDURE.)
-
-
- WHAT IT WON'T DO:
-
- Convert or remove BASICA commands that don't exist in GFA.
-
- Change the syntax in when it's different, e.g.:
- BASICA syntax for PRINT USING is:
- 1290 PRINT USING"f3=###.# Hz";F3 (note the semicolon)
- GFA syntax is:
- PRINT USING"f3=###.# Hz",F3 (note the comma)
-
- Compensate for differences in screen resolution or text height.
-
- OTHER PROBLEMS:
-
- Most other problems are caused by the differences between BASICA,
- which allows unstructured programming, and GFA, which doesn't like it.
- Code that jumps in and out of procedures, or procedures that have more than
- one RETURN statement, will be flagged if you use GFA's TEST command, and
- can throw off GFA's indenting. The code may still run in that form,
- however.
-
- Another little problem is that BASICA programs can have both GOTOs and
- GOSUBs to the same line number. This program's GOSUB detector only works
- the first time a particular line number is referenced. If the first time
- is a GOTO (or a THEN or an ELSE), and the next is a GOSUB, it won't be
- labled a PROCEDURE.
-
-
- I hope you find this program useful. Compiling it should result in much
- faster execution.
-
- GEnie: myeck.waters
- InterNet: myeck.waters@genie.geis.com
- AtariNet: myeck waters of 51:4/4.4
- FidoNet: myeck waters of 1:107/662.4
-